quartz: NSWindow NULL check in get_scale_factor
authorPhilip Chimento <philip.chimento@gmail.com>
Sat, 11 Oct 2014 04:35:23 +0000 (21:35 -0700)
committerJohn Ralls <jralls@ceridwen.us>
Wed, 24 Dec 2014 22:57:40 +0000 (14:57 -0800)
commitec37fbe2e29a7a02502f9a9d499a707f208e01d6
treeadfff158b3636e293f3dd9df7306847152664a38
parent4bd787f2afe14233e183fcfac7103cf9597ca50a
quartz: NSWindow NULL check in get_scale_factor

Sending backingScaleFactor to a NULL NSWindow will silently give the
value 0 for the scale factor, causing insidious divide-by-zero bugs down
the line. This checks if the NSWindow is NULL first, as seems to happen
throughout the rest of the file.

Note that I don't have a hi-DPI OS X machine to test this on, though.

https://bugzilla.gnome.org/show_bug.cgi?id=738338
gdk/quartz/gdkwindow-quartz.c